NAME$
— correct.WORDS
— wrong: String variable name must end with $person$
— correct.$sum
— wrong: $ must be at the end.VAL $
— wrong: You can't have a space inside a name.Here is a program that uses a string variable.
LET NAME$ = "Sherlock Holmes" PRINT NAME$ END
When this program is run the following happens:
NAME$
has not been seen before, the system finds memory for it.""
are not copied since they are not part of the string.)NAME$
are printed out.The following will appear on the monitor screen:
Sherlock Holmes
Here is a slightly different program:
LET NAME$ = Sherlock Holmes PRINT NAME$ END
What do you think will happen with this new program? (Hint: this is a trick question.)